package com.gdust.gkyx.activity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gdust.gkyx.model.activity.CouponInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ClassName: CouponInfoMapper
 * Package: com.gdust.gkyx.activity.mapper
 * Description:
 *
 * @Author syun
 * @Create 2025/1/26 16:12
 * @Version 1.0
 */
public interface CouponInfoMapper extends BaseMapper<CouponInfo> {

    /**
     *  //1 根据userId获取用户全部优惠卷
     * @param userId
     * @return
     */
    List<CouponInfo> selectCartCouponInfoList(@Param("userId") Long userId);


    //2 根据skuId+userId查询优惠卷信息
    List<CouponInfo> selectCouponInfoList(@Param("skuId") Long id,
                                          @Param("categoryId") Long categoryId,
                                          @Param("userId") Long userId);
}
